package com.bw.base.net

import com.bw.base.entity.NoticeBean
import com.bw.base.entity.Res
import com.bw.base.entity.UserBean
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ApiService {
    //用户登录
    @POST("/api/user/login")
    suspend fun login(@Query("username")username: String, @Query("password")password: String): Res<UserBean>
    @POST("/api/user/register")
    suspend fun register(@Query("username")username: String, @Query("password")password: String): Res<UserBean>
    @GET("/api/announcements")
    suspend fun getNotice(@Query("page")page: Int, @Query("size")size: Int): Res<NoticeBean>
}